home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / vmcmd.man < prev    next >
Encoding:
Text File  |  1991-03-10  |  7.9 KB  |  168 lines

  1. ' $Header: /sprite/src/cmds/vmcmd/RCS/vmcmd.man,v 1.4 91/03/10 13:43:28 kupfer Exp $ SPRITE (Berkeley)
  2. .so \*(]ltmac.sprite
  3. .HS VMCMD cmds
  4. .BS
  5. .SH NAME
  6. vmcmd \- set virtual memory parameters.
  7. .SH SYNOPSIS
  8. \fBvmcmd \fR[\fIoptions\fR]
  9. .SH OPTIONS
  10. .IP "\fB\-a \fIflagValue\fR" 20
  11. If \fIflagValue\fR is non-zero then the virtual memory system is forced to
  12. always refuse any file system requests for memory.
  13. .IP "\fB\-A \fIflagValue\fR" 20
  14. If \fIflagValue\fR is non-zero then the virtual memory system is forced
  15. to always satisfy any file system request for
  16. memory as long as it is possible.
  17. .IP "\fB\-c \fIpagesToCheck\fR" 20
  18. The number of pages to check during each interation
  19. of the clock algorithm is set to \fIpagesToCheck\fR .
  20. .IP "\fB\-C \fIflagValue\fR" 20
  21. If \fIflagValue\fR is non-zero then copy-on-write is enabled.
  22. .IP "\fB\-f \fIflagValue\fR" 20
  23. If \fIflagValue\fR is non-zero then pages are freed as soon as they are 
  24. cleaned.
  25. .IP "\fB\-F \fIpenalty\fR" 20
  26. If \fIpenalty\fR is less than zero then the file system is forced to pay
  27. a penalty of -\fIpenalty\fR seconds when asking for a page.  If it is
  28. greater than or equal to zero then the penalty is used in
  29. conjunction with the \fB\-n\fR option.
  30. .IP "\fB\-fsreset\fR" 20
  31. Reset the recorded minimum and maximum size of the file system cache
  32. to the current size.
  33. .IP "\fB\-x \fIsegNum\fR" 20
  34. Segment \fIsegNum\fR is flushed from memory; the \fB\-h\fR and 
  35. \fB\-l\fR options can be used to set upper and lower bounds respectively
  36. on the pages that are flushed.
  37. .IP "\fB\-h \fIpageNum\fR" 20
  38. The highest page that can be flushed is \fIpageNum\fR when using
  39. \fB\-x\fR option.
  40. .IP "\fB\-l \fIflagValue\fR" 20
  41. The lowest page that can be flushed is \fIpageNum\fR when using
  42. \fB\-x\fR option.
  43. .IP "\fB\-n \fInumGroups\fR" 20
  44. The number of groups to divide memory into when assessing a penalty is set to
  45. \fInumGroups\fR.
  46. .IP "\fB\-p \fIpageOutProcs\fR" 20
  47. The number of processes used to write back pages is set to \fIpageOutProcs\fR.
  48. .IP "\fB\-P \fIflagValue\fR" 20
  49. If \fIflagValue\fR is non-zero then pre-fetching is turned on.
  50. .IP "\fB\-r \fIflagValue\fR" 20
  51. If \fIflagValue\fR is non-zero then pages that are copied because of
  52. copy-on-reference faults are made read-only until they get modified.
  53. .IP "\fB\-R \fIflagValue\fR" 20
  54. If \fIflagValue\fR is non-zero then the virtual memory system will try
  55. to take advantage of the file system's read ahead policy.
  56. .IP "\fB\-s \fInumSeconds\fR" 20
  57. The number of seconds between iterations of the clock algorithm is set to
  58. be \fInumSeconds\fR.
  59. .IP "\fB\-t \fItracesPerSec\fR" 20
  60. Virtual memory tracing is turned on at the rate of \fItracesPerSec\fR
  61. traces per second.
  62. .IP "\fB\-T\fR" 20
  63. Virtual memory tracing is turned off.
  64. .IP "\fB\-e n [ -X n2 ]\fR" 20
  65. Hook for extra commands.  This executes \fIVm_Cmd(n,n2)\fP, with \fIn2\fP
  66. defaulting to 0.
  67. .BE
  68.  
  69. .SH INTRODUCTION
  70. .LP
  71. This command sets various parameters of the virtual memory system.  It
  72. is implemented using the Vm_Cmd system call.  It controls behavior of
  73. the virtual memory system in 7 areas: virtual memory and file system
  74. negotiation, virtual memory tracing, the speed of the clock algorithm,
  75. flushing of segments, prefetch, copy-on-write and other miscellaneous
  76. things.
  77. .SH "VM-FS NEGOTIATION"
  78. .LP
  79. There are four options to \fBvmcmd\fR that can be used to control the
  80. negotiation between the virtual memory system and the file system.
  81. The most interesting are the options which allow the file  system
  82. to be penalized relative to the virtual memory system.
  83. The \fB\-F\fR and \fB\-n\fR options are
  84. used to control the penalty.  The simplest way to penalize the file system
  85. is to supply the \fB\-F \fIpenalty\fR option with a negative number.  
  86. In this case the file system is penalized by the absolute value of 
  87. \fIpenalty\fP each time that it asks for memory.  The penalty is assessed 
  88. by adding \fIpenalty\fP seconds to the access time of each VM page so that
  89. the VM pages seem to have been used more recently than they really have.
  90. .LP
  91. The \fB\-n \fInumGroups\fR option gives a more complex method of penalizing the
  92. file system.  With this option the number of available pages are divided
  93. up into \fInumGroups\fR groups.  When the file system asks for memory
  94. the penalty depends on how many pages that it already has.  Its
  95. penalty is assessed as
  96. .sp
  97. .in +0.5i
  98. (\fIcurrent-number-of-pages\fR / \fInumGroups\fR) * \fIpenalty\fP
  99. .in -0.5i
  100. .sp
  101. seconds.
  102. .LP
  103. There are two other ways to effect the VM-FS negotiation.  The \fB\-a\fR
  104. option can be used to force the virtual memory system to always refuse to
  105. give memory to the file system.  The \fB\-A\fR can be used to force the
  106. virtual memory sysytem to always satisfy the file system's requests for
  107. memory as long as they are feasible.  These options are designed to be used
  108. to determine the effect of different polices on VM and FS negotiation.
  109. .SH "TRACING"
  110. .LP
  111. The virtual memory system has the ability to trace segment creation
  112. and destruction, reference and modify bit use, page faults
  113. and copy-on-write behavior.  Tracing is turned on with \fB\-t \fItracePerSec\fR
  114. option.  Once tracing is turned on everything but the reference
  115. and modify bit traces will be traced as it occurs.  However,
  116. the reference and modify bits are traced by scanning the hardware page maps
  117. \fItracePerSec\fR times per second.  The output of the trace is stored in
  118. the file ``/sprite/vmtrace/tfile.\fIhost-id\fR'' where \fIhost-id\fR is the
  119. sprite id for the host.  Tracing is terminated with the \fB\-T\fR option.
  120. .SH CLOCK
  121. .LP
  122. The virtual memory system keeps all pages in approximate least-recently-used
  123. (LRU) order by using a version of the clock algorithm.  The clock algorithm
  124. is implemented by scanning a given number of pages in memory every few
  125. seconds.  The number of pages that are scanned can be set with the
  126. \fB\-c \fIpagesToCheck\fR option and how often the pages are scanned
  127. can be set with the \fB\-s \fInumSeconds\fR option.  The result is that
  128. \fIpagesToCheck\fR pages are checked every \fInumSeconds\fR.
  129. .SH FLUSHING
  130. .LP
  131. In order to allow measurement of the performance of
  132. the virtual memory system, \fBvmcmd\fR allows segments to be flushed from memory.
  133. When a segment is flushed dirty pages are written to swap
  134. space and the pages in the segment are removed from memory.  The
  135. \fB\-x \fIsegNum\fR option is used to specify which segment to flush and
  136. the \fB\-l \fIlowPageNum\fR and \fB\-h \fIhighPageNum\fR options are used to
  137. specify the range of pages to flush.  By default the lowest page to flush
  138. is the lowest page in the segment and the highest is the highest page in
  139. the segment.  However, the \fB\-l\fR or \fB\-h\fR
  140. options can be used to set the lowest page to \fIlowPageNum\fR and the
  141. highest to \fIhighPageNum\fP respectively.
  142. .SH PREFETCH
  143. .LP
  144. Both the virtual memory system and the file system implement prefetch.
  145. Virtual memory prefetch can be turned on or off by using the
  146. \fB\-P \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  147. prefetching is enabled and if it is zero prefetching is disabled.  Likewise
  148. whether or not the virtual memory system takes advantage of the file
  149. system's prefetech can be determined with the \fB\-R \fIflagValue\fR option;
  150. non-zero means use FS prefetch, 0 means don't use it.
  151. .SH COPY-ON-WRITE
  152. .LP
  153. Copy-on-write can be turned on or off by using the \fB\-C \fIflagValue\fR
  154. option.  If \fIflagValue\fR is non-zero then
  155. copy-on-write is enabled and if it zero copy-on-write is disabled.
  156. .SH MISCELLANEOUS
  157. .LP
  158. There are two other parameters of the virtual memory system that
  159. can be set with \fBvmcmd\fR.  The number of processes that are used to
  160. write out dirty pages can be set with the \fB\-p \fIpageOutProcs\fR option.
  161. Whether or not memory is freed once it gets to the front of the allocate
  162. list or it is left alone until it has to be recycled is controlled with the
  163. \fB\-f \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  164. pages are freed once they are cleaned and if it is zero 
  165. pages remain on the front of the allocate list after they are cleaned.
  166. .SH KEYWORDS
  167. virtual memory
  168.